/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.tradeplus.jms;

import java.util.Map;
import org.springframework.jms.JmsException;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 *
 * @author ronnie
 */

/**
 * Implements the JmsMapPublisherService
 */
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public class JmsMapPublisherServiceImpl implements JmsMapPublisherService {
    private JmsTemplate jmsTemplate;

    public void setJmsTemplate(JmsTemplate jmsTemplate) {
        this.jmsTemplate = jmsTemplate;
    }
    
    @Override
    public void sendMapMessage(Map<String, String> payload) throws JmsException {
	this.jmsTemplate.convertAndSend(payload);
    }
}
